<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>短网址服务平台</title>
	<meta name="description" content="这是一个 index 页面">
	<meta name="keywords" content="index">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="renderer" content="webkit">
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="icon" type="image/png" href="assets/i/favicon.png">
	<link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
	<meta name="apple-mobile-web-app-title" content="Amaze UI" />
	<link rel="stylesheet" href="//cdn.staticfile.org/amazeui/2.7.2/css/amazeui.min.css" />
	<link rel="stylesheet" href="assets/css/admin.css">
	<link rel="stylesheet" href="assets/css/app.css">
</head>

<body data-type="login">

	<div class="am-g myapp-login">
		<div class="myapp-login-logo-block  tpl-login-max">
			<div class="myapp-login-logo-text">
				<div class="myapp-login-logo-text">
					<i class="am-icon-skyatlas"></i>找回密码
				</div>
			</div>

			<div class="login-font">
				<a href="login.html"><span><i>登录 </i></span></a> or <a href="register.html"><span> 注册</span></a>
			</div>
			<div class="am-u-sm-10 login-am-center">
				<form class="am-form" id="dataForm" onsubmit="return false">
					<fieldset>
						<div class="am-form-group">
							<input type="text" name="email" id="email" placeholder="输入电子邮件">
						</div>
						<div class="am-form-group">
							<a style="float:right" href="javascript:sendCode()">发送验证码</a>
						</div>
						<div class="am-form-group">
							<input type="text" id="code" name="code" placeholder="验证码">
						</div>
						<div class="am-form-group">
							<br>
						</div>
						<div class="am-form-group">
							<input type="password" id="password" name="password" placeholder="新密码">
						</div>
						<p>
							<button type="button" onclick="resetPwd()" class="am-btn am-btn-default">注册</button>
						</p>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
	<script src="//cdn.staticfile.org/jquery/2.0.3/jquery.min.js"></script>
	<script src="//cdn.staticfile.org/amazeui/2.7.2/js/amazeui.min.js"></script>
	<script src="assets/js/app.js"></script>
	<script src="assets/js/common.js"></script>
	<script>
		function sendCode() {
			$.post("../verificat/sendCode", form2JsonString($("#dataForm")), function (
				data) {
				alert(data.msg);
				return;
			}, "json");
		}
		function resetPwd() {
			$.post("../user/resetPwd", form2JsonString($("#dataForm")), function (
				data) {
				if (data.code == 200) {
					location.href = 'index.html';
					return;
				}
				alert(data.msg);
				return;
			}, "json");
		}
	</script>
</body>

</html>